package service.impl;

import java.util.List;

import dao.StudentDao;
import dao.Impl.StudentDaoImpl;

import bean.Student;
import service.StudentService;

public class StudentServiceImpl implements StudentService{
	@Override
	public List<Student> findAll() {
		StudentDao studentDao = new StudentDaoImpl();
		List<Student> students = studentDao.findAll();
		return students;
	}

	@Override
	public List<Student> selectStudentByStuname(String stuname) {
		StudentDao studentDao = new StudentDaoImpl();
		List<Student> students = studentDao.selectStudentByStuname(stuname);
		return students;
	}
	
	@Override
	public boolean deleteStudent(String stuno){
		
		StudentDao studentDao = new StudentDaoImpl();
		boolean students = studentDao.deleteStudent(stuno);
		return students;
	}

	@Override
	public boolean SaveStudent(Student stu){
		StudentDao studentDao = new StudentDaoImpl();
		boolean flag = studentDao.saveStudent(stu);
		return flag;
	}
	

}
